package global

import (
	"regexp"
	"yunj/config"

	"github.com/gin-gonic/gin"
	"github.com/lionsoul2014/ip2region/binding/golang/xdb"
	"github.com/olivere/elastic/v7"
	"github.com/redis/go-redis/v9"
	"github.com/robfig/cron/v3"
	"github.com/sirupsen/logrus"
	"github.com/ua-parser/uap-go/uaparser"
	"github.com/worklz/go-captcha"
	"gorm.io/gorm"
)

var (
	Config         *config.Config
	Logger         *logrus.Logger
	MySQL          *gorm.DB
	Redis          *redis.Client
	Setting        map[string]map[string]any // {group:{key:value,...},...}
	ExposeConfig   map[string]any
	ThemeConfig    []map[string]any
	Captcha        *captcha.Captcha
	IpSearcher     *xdb.Searcher
	ProvinceRegexp *regexp.Regexp
	Uaparser       *uaparser.Parser
	Corn           *cron.Cron
	GinEngine      *gin.Engine
	EsClient       *elastic.Client
)
